package com.apabi.dao;

import com.apabi.model.Collections;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Created by atom on 18-1-12.
 */
public interface CollectionsDao extends JpaRepository<Collections, Integer> {

     Page<Collections> findByUserId(int uid, Pageable pageable);

    /**
     * 根据用户id删除
     * @param id
     */
     void removeByUserId(Integer id);

    /**
     * 单个收藏id删除
     * @param id
     */
     void removeByIdAndUserId(Integer id,Integer userId);
}
